package com.zx.erpsystem.system.serviceimpl;

import com.zx.erpsystem.system.dao.SalesOrderBrowseMapper;
import com.zx.erpsystem.system.model.SalesOrderBrowse;
import com.zx.erpsystem.system.service.SalesOrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class SalesOrderServiceImpl implements SalesOrderService {
    @Autowired
    private SalesOrderBrowseMapper salesOrderBrowseMapper;
    @Override
    public List<SalesOrderBrowse> queryAllSalesOrder() {
        return salesOrderBrowseMapper.queryAllSalesOrder();
    }

    @Override
    public SalesOrderBrowse getsalesOrder(Integer id) {
        return salesOrderBrowseMapper.selectByPrimaryKey(id);
    }

    @Override
    public int updateSalesOrder(SalesOrderBrowse salesOrderBrowse) {
        return salesOrderBrowseMapper.updateByPrimaryKeySelective(salesOrderBrowse);
    }

    @Override
    public int deleteSob(Integer sobNo) {
        return salesOrderBrowseMapper.deleteByPrimaryKey(sobNo);
    }

    @Override
    public int insertSalesOrder(SalesOrderBrowse sob) {
        return salesOrderBrowseMapper.insertSelective(sob);
    }


}
